package service.Impl;

import dao.VegetableTypeDao;
import entity.VegetablesTypes;
import service.VegetableTypeService;

import java.sql.SQLException;
import java.util.List;

/**
 * Created by Administrator on 2017/11/11.
 */
public class VegetableTypeImpl implements VegetableTypeService {
    private VegetableTypeDao vtd=new VegetableTypeDao();
    @Override
    public List<VegetablesTypes> query(){
        List<VegetablesTypes> list=null;
        try {
            list=vtd.query();
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }finally {
            try {
                vtd.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return list;
    }
}
